//
//  SegmentHeaderView.m
//  quxiangtao
//
//  Created by E人一铺 on 2018/11/15.
//  Copyright © 2018年 shanhaijin. All rights reserved.
//

#import "SegmentHeaderView.h"


@interface SegmentHeaderView()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>

@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, copy) NSArray *titleArray;
@property (nonatomic, strong) UIView *moveLine;
@property (nonatomic, strong) UIView *separator;
@property (nonatomic, assign) BOOL selectedCellExist;

@end

CGFloat const SegmentHeaderViewHeight = 200;

@implementation SegmentHeaderView

- (void)changeItemWithTargetIndex:(NSUInteger)targetIndex {
    
    
}


- (instancetype)initWithFrame:(CGRect)frame titleArray:(NSArray *)titleArray {
    if (self = [super initWithFrame:frame]) {
        [self setupSubViews];
        self.titleArray = titleArray;
        self.selectedIndex = 0;
    }
    return self;
    
}


#pragma mark - Private Method
- (void)setupSubViews {
    
    [self addSubview:self.collectionView];
    [self.collectionView addSubview:self.moveLine];
    [self addSubview:self.separator];
    
    [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(140);
        make.left.right.mas_equalTo(0);
        make.height.mas_equalTo(60);
    }];

}


@end
